﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HeadFirest._08.IteratorAndComponet._01.Menus
{
    public abstract class Menucomponent
    {
        public abstract string GetName();
        public abstract string GetDescription();
        public virtual double GetPrice() 
        {
            throw new NotSupportedException();

        }
        public virtual bool IsVegetarian() 
        {
            return false;
        }
        public abstract void Print();

        public virtual void Add(Menucomponent component) 
        {
        }
        public virtual void Remove(Menucomponent component) 
        {

        }

        public virtual Menucomponent GetChild(int i) 
        {
            return this;
        }



    }
}
